home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-04-29 | 2.5 KB | 82 lines | [TEXT/GEOL] |
- Item 1463472 8-April-91 19:26PDT
-
- From: AUST0338 AUPtnr - Tactics Int'l,Shillito,IDV
-
- To: APPLE.BUGS Apple Bugs Reporting
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Item forwarded by BOWMAN to TRAMMEL1
-
- ------------------------------------------------------------------------------
-
- Sub: MAOpenFile bug with ISO CD
-
- To: APPLE.BUGS
- Cc: MACAPP.TECH$
- From: AUST0338 - David Shillito
- Date: 9th April 1991
-
- Subject: MAOpenFile bug with ISO CD
-
- MAOpenFile, which is called during the implementation of the Open command in
- MacApp, seems to have a problem opening files residing on an ISO 9660 CD. Even
- though it is being called with dataPerm set to fsRDPerm, ie. requesting read
- access only, it is returning error code -44 which means "diskette is write
- protected".
-
- I have tracked this down to the following call to PBHOpenDeny
-
- IF qNeedsROM128K | gConfiguration.hasHFS THEN
- result := PBHOpenDeny(@pb, FALSE) { Try the shared volume open. }
- ELSE
- result := paramErr;
-
- IF result = paramErr THEN { Not on a shared volume, try HFS open. }
- BEGIN
- pb.ioPermssn := BAND(dataPerm, 3);
- result := PBHOpen(@pb, FALSE);
- END;
- TestForError(result);
-
- I cured the problem, by checking for the new error code as follows:
-
- IF qNeedsROM128K | gConfiguration.hasHFS THEN
- result := PBHOpenDeny(@pb, FALSE) { Try the shared volume open. }
- ELSE
- result := paramErr;
-
- IF (result = paramErr) |{ JDS 910409 - ISO CD returns wPrErr }
- (result = wPrErr) THEN { Not on a shared volume, try HFS open. }
- BEGIN
- pb.ioPermssn := BAND(dataPerm, 3);
- result := PBHOpen(@pb, FALSE);
- END;
- TestForError(result);
-
-
- While investigating the above bug I also noticed, in the same procedure, that
- the parameter block for PBHOpenDeny does not seem to be set up correctly. The
- pb.ioPermssn field is being set up although it will not be used and the
- pb.ioDenyModes field, which is required for PBHOpenDeny, is not being setup. I
- suggest the following code:
-
- WITH pb DO
- BEGIN
- ioNamePtr := @name;
- ioVRefnum := volRefnum;
- ioVersNum := 0;
- CASE dataPerm OF{ JDS 910409 }
- fsRdPerm: ioDenyModes := 1;
- fsWrPerm: ioDenyModes := 2;
- fsRdWrPerm: ioDenyModes := 1+2+16+32;
- fsRdWrShPerm: ioDenyModes := 1+2;
- OTHERWISE ioDenyModes := 1+2; {???}
- END {CASE};
- ioMisc := NIL;
- END;
-
-
- David Shillito
-
-